import { Button } from 'antd'
import { useAppDispatch, useAppSelector } from '@/store'
import { countAdd } from '@/store/modules/test.ts'

const Home = () => {
  const dispatch = useAppDispatch()
  const { count } = useAppSelector(state => state.test)
  const storeTest = () => {
    dispatch(countAdd(1))
    console.log(count)
  }

  return (
    <>
      <Button
        type='primary'
        onClick={() => {
          storeTest()
        }}
      >
        测试toolkit
      </Button>
    </>
  )
}
export default Home
